from django.urls import path
from rest_framework.routers import DefaultRouter
from . import views
router = DefaultRouter()  # 有根路由
router.register(r'courses', views.courseView)

urlpatterns = [
    path('tag/',views.TagView.as_view()),
    path('category/',views.CategoryView.as_view()),
    path('course/',views.CourseView.as_view()),
]

urlpatterns += router.urls  # 模块地址
# print(router.urls)